<!doctype html>
<html>
<head>
    <include file="public/head"/>
    <title>千佰特留言板管理</title>
    <meta name="description" content="千佰特留言板管理">
    <meta name="keywords" content="千佰特留言板管理">
    <style>
        #inputbox{
            padding-left: 480px;
        }
        .margin-top-20 {
            margin-top: 2px !important;
            margin-bottom: 2px;
        }
        .well{
            padding:10px;
        }
        .table-actions{
            margin-bottom: 2px;
        }
    </style>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>广告位置</a></li>
        <php>if(qbt_is_super_admin()){</php><li><a href="{:cmf_plugin_url('QbtAdvertising://AdminIndex/ad_add')}">添加广告位置</a></li><php>}</php>
    </ul>
    <form method="post" class="js-ajax-form margin-top-20" action="#">
        <div class="table_list">
            <table width="100%" class="table table-hover">
                <thead>
                <tr>
                    <th>广告位名称</th>
                    <th>广告位标识</th>
                    <th>媒介类型</th>
                    <th>广告位描述</th>
                    <th width="120">操作</th>
                </tr>
                </thead>
                <tbody>
                <?php
                    if(count($lists)>0){
                        foreach($lists as $val){
                ?>
                <tr>
                    <td>{$val['position_name']}</td>
                    <td>{$val['ad_logo']}</td>
                    <td><?php if($val['media_type']==1){echo "文字";}else if($val['media_type']==2){echo "自定义";}else{echo "图片";}?></td>
                    <td>{$val['position_desc']}</td>
                    <td width="200">
                        <a href="{:cmf_plugin_url('QbtAdvertising://AdminIndex/index',['pid'=>$val['id']])}">广告管理</a>
                        <a href="{:cmf_plugin_url('QbtAdvertising://AdminIndex/ad_edit',['id'=>$val['id']])}">编辑</a>
                        <php>if(qbt_is_super_admin()){</php><a href="{:cmf_plugin_url('QbtAdvertising://AdminIndex/ad_delete',['id'=>$val['id']])}" class="js-ajax-delete">删除</a><php>}</php>
                    </td>
                </tr>
                <?php
                        }
                    }else{
                ?>
                <tr><td colspan="4">暂无广告位</td></tr>
                <?php
                    }
                ?>
                </tbody>
            </table>
            <div class="pagination">{$page}</div>
        </div>
    </form>
</div>
<include file="public/scripts"/>
<script type="text/javascript" src="__STATIC__/js/layer/layer.js"></script>
<script>
    var index = '';
    $(".content").click(function(){
       var v = $(this).prev().text();
       index = layer.open({
           title:'详细内容',
           shade: 0,
           content: v
       })
    });

    // $(".content").mouseleave(function(){
    //     layer.close(index);
    // });


</script>
</body>
</html>